package com.itheima.day08;
/*

案例10:   字符串的拼接
 */

public class TestClassCase10 {

    public static void main(String[] args) {

        String[] sr={"jk","dn","jfs"};
        String a=appStr(sr);
        System.out.println(a);
    }


    public static  String  appStr(String[] st){

        StringBuilder s=new StringBuilder("[");

        for (int i = 0; i < st.length; i++) {
            if (i==st.length-1){
                s.append(st[i]).append(']');
            }else{
                s.append(st[i]).append(", ");
            }
        }

        return s.toString();
    }
}
